<template>
  <div>
    <el-table :data="tableList" height="500">
      <el-table-column prop="sequence" label="编号" width="80">
      </el-table-column>
      <el-table-column prop="contentName" label="检查内容名称" width="220">
      </el-table-column>
      <el-table-column prop="units" label="计量单位" width="120">
      </el-table-column>
      <el-table-column label="正常值参考范围">
        <template slot-scope="scope">
          <span>{{ scope.row.minLimit }}--{{ scope.row.maxLimit }}</span>
        </template>
      </el-table-column>
      <el-table-column :width="180" label="操作">
        <template slot-scope="scope">
          <el-button @click="handleClick(scope.row)" type="primary" size="small"
            >编辑</el-button
          >
          <el-button @click="remove(scope.row)" type="danger" size="small"
            >删除</el-button
          >
        </template>
      </el-table-column>
    </el-table>
    <addPagesContent
      :dialogFormcontent="dialogFormcontent"
      :project="project"
      @hidelog="hidelog"
    ></addPagesContent>
    <!-- 底部分类常用结果 -->
  </div>
</template>

<script lang="ts">
import Vue from "vue";
import addPagesContent from "./addPagesContent.vue";
export default {
  components: {
    addPagesContent,
  },
  data() {
    return {
      formLabelWidth: "80px",
      // 常用结果弹框
      dialogFormresult: false,
      dialogresultClick: false,
      form: { type: "" },
      dialogFormcontent: false,
      // tableList: [
      //   {
      //     sequence: "1",
      //     contentName: "白细胞",
      //     units: "mg",
      //     scopeApplication: "4.0—10.0",
      //     pathogeny: "*****----*****",
      //   },
      //   {
      //     sequence: "2",
      //     contentName: "血红蛋白",
      //     units: "mg",
      //     scopeApplication: "110—155",
      //     pathogeny: "*****----*****",
      //   },
      //   {
      //     sequence: "3",
      //     contentName: "红细胞比积",
      //     units: "mg",
      //     scopeApplication: "33.5—45.0",
      //     pathogeny: "*****----*****",
      //   },
      //   {
      //     sequence: "4",
      //     contentName: "平均红细胞体积",
      //     units: "mg",
      //     scopeApplication: "80.0—99",
      //     pathogeny: "*****----*****",
      //   },
      //   {
      //     sequence: "5",
      //     contentName: "平均红细胞血红蛋白含量",
      //     units: "mg",
      //     scopeApplication: "26.0—33.0",
      //     pathogeny: "*****----*****",
      //   },
      // ],
    };
  },
  methods: {
    // 编辑
    handleClick(row) {
      console.log(row);
      this.project = row;
      this.dialogFormcontent = true;
    },
    // 常用结果
    resultClick() {
      this.dialogresultClick = true;
    },
    hidelog(value) {
      this.dialogFormcontent = false;
      // console.log(value);
    },
  },
  props: {
    // grade: {
    //   type: Number,
    //   default: true,
    // },
    tableList: {
      type: Array,
    },
  },
};
</script>

<style scoped>
.dialog_flex {
  display: flex;
}
.dialog_flex_r {
  margin-left: 20px;
}
.el-form--inline .el-form-item {
  width: 300px;
}
.project_group {
  width: 100px !important;
  margin-top: 40px;
  margin-left: 20px;
}
.project_btn {
  width: 100px;
  float: right;
  text-align: right;
  margin-right: 80px;
  margin-top: 20px;
}
.project_btn .project_btn_r {
  margin-top: 20px;
}
</style>